<!--
 * @Author: fengshan0525 2735332396@qq.com
 * @Date: 2023-03-17 20:43:12
 * @LastEditors: fengshan0525 2735332396@qq.com
 * @LastEditTime: 2023-03-18 10:35:19
 * @FilePath: \b-vue3-ts-ele-template\src\App.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <router-view></router-view>
</template>
<script>
const debounce = (fn, delay) => {
  let timer = null

  return function () {
    const context = this
    const args = arguments

    clearTimeout(timer)
    timer = setTimeout(function () {
      fn.apply(context, args)
    }, delay)
  }
}

// 解决ERROR ResizeObserver loop completed with undelivered notifications.
// 问题的

const _ResizeObserver = window.ResizeObserver
window.ResizeObserver = class ResizeObserver extends _ResizeObserver {
  constructor (callback) {
    callback = debounce(callback, 16)

    super(callback)
  }
}
</script>
<style lang="less">
#app {
  height: 100%;
}
</style>
